﻿using Parylene_CVD.Model.DModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Parylene_CVD.DAL

{
    public class DeviceDAL : BaseDAL<Device>
    {
        public List<Device> GetAllDevice()
        {
            return GetModelList("");
        }
        public List<Device> GetDevice(string strWhere, string strCols)
        {
            return GetModelList(strWhere, strCols, null);
        }

        public int AddDevice(Device Device, string strCols)
        {
            int a = Add(Device, strCols, 0);
            return a;
        }

        public bool AddListDevice(List<Device> Devices, string strCols)
        {
            bool a = AddList(Devices, strCols);
            return a;
        }

        public bool UpdataDevice(Device Device, string strCols)
        {
            return Update(Device, strCols);
        }
        public bool UpdataDevice(Device Device, string strCols, string strWhere)
        {
            return Update(Device, strCols, strWhere, null);
        }
        public bool UpdataListDevice(List<Device> Devices, string strCols)
        {
            return UpdateList(Devices, strCols);
        }

        public bool DeleteDeviceByID(object id)
        {
            return Delete(id);
        }

        public bool DeleteDevice(string strWhere)
        {
            return Delete(strWhere, null);
        }

        public bool DeleteListDeviceByID(List<object> idList)
        {
            return DeleteList(idList);
        }
    }
}
